
//entry
export enum ENTRY_TYPE {
    ENTRY_TYPE_SPRIT = 0,
    ENTRY_TYPE_DOC = 1,
    ENTRY_TYPE_PAGES = 2,
    ENTRY_TYPE_BOARD = 3,
    ENTRY_TYPE_FILE = 4,
    ENTRY_TYPE_API_COLL = 5,
    ENTRY_TYPE_DATA_ANNO = 6
}

export enum ISSUE_LIST_TYPE {
    ISSUE_LIST_ALL = 0,
    ISSUE_LIST_LIST = 1,
    ISSUE_LIST_KANBAN = 2
}

export interface EntryTag {
    tagId?: string;
    tagName?: string;
    bgColor?: string;
}

export interface EntryWatchUser {
    memberUserId?: string;
    displayName?: string;
    logoUri?: string;
}

export interface ExtraSpritInfo {
    startTime?: number;
    endTime?: number;
    nonWorkDayList?: number[];
    issueListType?: ISSUE_LIST_TYPE;
    hideGanttPanel?: boolean;
    hideBurndownPanel?: boolean;
    hideStatPanel?: boolean;
    hideSummaryPanel?: boolean;
    hideTestPlanPanel?: boolean;
}

export interface EntryInfo {
    entryId?: string;
    entryType?: ENTRY_TYPE;
    entryTitle?: string;
    myWatch?: boolean;
    tagList?: EntryTag[];
    // entryPerm?: EntryPerm;
    markSys?: boolean;
    watchUserList?: EntryWatchUser[];
    parentFolderId?: string;
    createUserId?: string;
    createDisplayName?: string;
    createLogoUri?: string;
    createTime?: number;
    updateUserId?: string;
    updateDisplayName?: string;
    updateLogoUri?: string;
    updateTime?: number;
    extraSpritInfo?: ExtraSpritInfo;
}
//share

export enum SHARE_TARGET_TYPE {
    SHARE_TARGET_WORK_PLAN = 0,
    SHARE_TARGET_DOC = 1,
    SHARE_TARGET_BOARD = 2,
    SHARE_TARGET_TASK = 3,
    SHARE_TARGET_BUG = 4,
    SHARE_TARGET_REQUIRE_MENT = 5,
    SHARE_TARGET_DRAW = 6,
}

export interface ShareInfo {
    shareId?: string;
    projectId?: string;
    targetType?: SHARE_TARGET_TYPE;
    targetId?: string;
    expireTime?: number;
    shareSecret?: string;
    shareUserId?: string;
    shareDisplayName?: string;
    shareLogoUri?: string;
    shareTime?: number;
    targetName?: string;
}

//issue 

export enum ISSUE_TYPE {
    ISSUE_TYPE_TASK = 0,
    ISSUE_TYPE_BUG = 1
}

export enum ISSUE_STATE {
    ISSUE_STATE_PLAN = 0,
    ISSUE_STATE_PROCESS = 1,
    ISSUE_STATE_CHECK = 2,
    ISSUE_STATE_CLOSE = 3
}

export enum PROCESS_STAGE {
    PROCESS_STAGE_TODO = 0,
    PROCESS_STAGE_DOING = 1,
    PROCESS_STAGE_DONE = 2
}
export enum TASK_PRIORITY {
    TASK_PRIORITY_LOW = 0,
    TASK_PRIORITY_MIDDLE = 1,
    TASK_PRIORITY_HIGH = 2
}
export enum BUG_LEVEL {
    BUG_LEVEL_MINOR = 0,
    BUG_LEVEL_MAJOR = 1,
    BUG_LEVEL_CRITICAL = 2,
    BUG_LEVEL_BLOCKER = 3
}
export enum BUG_PRIORITY {
    BUG_PRIORITY_LOW = 0,
    BUG_PRIORITY_NORMAL = 1,
    BUG_PRIORITY_HIGH = 2,
    BUG_PRIORITY_URGENT = 3,
    BUG_PRIORITY_IMMEDIATE = 4
}

export interface BasicIssueInfo {
    title?: string;
    content?: string;
    tagIdList?: string[];
}

export interface IssueTag {
    tagId?: string;
    tagName?: string;
    bgColor?: string;
}

export interface IssueWatchUser {
    memberUserId?: string;
    displayName?: string;
    logoUri?: string;
}

export interface SimpleSubIssue {
    subIssueId?: string;
    title?: string;
    done?: boolean;
    issueId?: string;
}

export interface SubIssueStatus {
    subIssueList?: SimpleSubIssue[];
    totalCount?: number;
    doneCount?: number;
}

export interface ExtraTaskInfo {
    priority?: TASK_PRIORITY;
}

export interface ExtraBugInfo {
    softwareVersion?: string;
    level?: BUG_LEVEL;
    priority?: BUG_PRIORITY;
}

export interface IssueInfo {
    issueId?: string;
    issueType?: ISSUE_TYPE;
    issueIndex?: number;
    basicInfo?: BasicIssueInfo;
    projectId?: string;
    createTime?: number;
    updateTime?: number;
    state?: ISSUE_STATE;
    createUserId?: string;
    execUserId?: string;
    checkUserId?: string;
    spritId?: string;
    spritName?: string;
    processStage?: PROCESS_STAGE;
    createDisplayName?: string;
    execDisplayName?: string;
    checkDisplayName?: string;
    msgCount?: number;
    dependMeCount?: number;
    reOpenCount?: number;
    tagInfoList?: IssueTag[];
    watchUserList?: IssueWatchUser[];
    subIssueStatus?: SubIssueStatus;
    hasStartTime?: boolean;
    startTime?: number;
    hasEndTime?: boolean;
    endTime?: number;
    hasEstimateMinutes?: boolean;
    estimateMinutes?: number;
    hasRemainMinutes?: boolean;
    remainMinutes?: number;
    hasDeadLineTime?: boolean;
    deadLineTime?: number;
    // userIssuePerm?: UserIssuePerm;
    requirementId?: string;
    requirementTitle?: string;
    myWatch?: boolean;
    extraTaskInfo?: ExtraTaskInfo;
    extraBugInfo?: ExtraBugInfo;
}

//requirement

export interface BaseRequirementInfo {
    title?: string;
    content?: string;
    tagIdList?: string[];
}

export interface RequirementWatchUser {
    memberUserId?: string;
    displayName?: string;
    logoUri?: string;
}

export interface RequirementTag {
    tagId?: string;
    tagName?: string;
    bgColor?: string;
}

export interface RequirementInfo {
    requirementId?: string;
    projectId?: string;
    baseInfo?: BaseRequirementInfo;
    issueLinkCount?: number;
    closed?: boolean;
    myWatch?: boolean;
    watchUserList?: RequirementWatchUser[];
    createUserId?: string;
    createTime?: number;
    createDisplayName?: string;
    createLogoUri?: string;
    updateUserId?: string;
    updateTime?: number;
    updateDisplayName?: string;
    updateLogoUri?: string;
    tagInfoList?: RequirementTag[];
    kanoExciteValue?: number;
    kanoExpectValue?: number;
    kanoBasicValue?: number;
    kanoNodiffValue?: number;
    kanoReverseValue?: number;
    kanoDubiouseValue?: number;
    fourQUrgencyValue?: number;
    fourQImportantValue?: number;
    // userRequirementPerm?: UserRequirementPerm;
};

export interface KanoRow {
    like?: number;
    expect?: number;
    neutral?: number;
    tolerate?: number;
    dislike?: number;
}

export interface KanoInfo {
    requirementId?: string;
    likeVsRow?: KanoRow;
    expectVsRow?: KanoRow;
    neutralVsRow?: KanoRow;
    tolerateVsRow?: KanoRow;
    dislikeVsRow?: KanoRow;
}

export interface FourQInfo {
    requirementId?: string;
    urgentAndImportant?: number;
    urgentAndNotImportant?: number;
    notUrgentAndNotImportant?: number;
    notUrgentAndImportant?: number;
}

// sprit

export enum SUMMARY_STATE {
    SUMMARY_COLLECT = 0,
    SUMMARY_SHOW = 1
}

export interface SpritInfo {
    spritId?: string;
    projectId?: string;
    taskCount?: number;
    bugCount?: number;
    summaryState?: SUMMARY_STATE;
}

export interface BurnDownInfo {
    spritId?: string;
    day?: number;
    memberUserId?: string;
    memberDisplayName?: string;
    memberLogoUri?: string;
    remainMinutes?: number;
}

export interface SummaryTag {
    tagId?: string;
    tagName?: string;
    bgColor?: string;
}

export interface SummaryItemInfo {
    summaryItemId?: string;
    content?: string;
    createUserId?: string;
    createDisplayName?: string;
    createLogoUri?: string;
    createTime?: number;
    groupId?: string;
    tagInfo?: SummaryTag;
}

// draw
export interface DrawInfo {
    drawId?: string;
    content?: string;
}

//doc 
export interface BaseDoc {
    content?: string;
}

export interface DocInfo {
    docId?: string;
    baseInfo?: BaseDoc;
}